<!--
  ~ /*
  ~  *    Copyright 2020-2021 Luter.me
  ~  *
  ~  *    Licensed under the Apache License, Version 2.0 (the "License");
  ~  *    you may not use this file except in compliance with the License.
  ~  *    You may obtain a copy of the License at
  ~  *
  ~  *      http://www.apache.org/licenses/LICENSE-2.0
  ~  *
  ~  *    Unless required by applicable law or agreed to in writing, software
  ~  *    distributed under the License is distributed on an "AS IS" BASIS,
  ~  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~  *    See the License for the specific language governing permissions and
  ~  *    limitations under the License.
  ~  */
  -->

<!DOCTYPE html>
<html lang="zh-CN" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:auth="http://www.w3.org/1999/xhtml">
<head>
    <title>Layout 页面</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.0.2/css/bootstrap.min.css" rel="stylesheet">
    <style>
        .selector-for-some-widget {
            box-sizing: content-box;
        }
    </style>
</head>
<body>
<header class="p-3 bg-dark text-white fixed-top">
    <div class="container-fluid">
        <div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start">
            <a href="/" class="d-flex align-items-center mb-2 mb-lg-0 text-white text-decoration-none">
                <svg class="bi me-2" width="40" height="32" role="img" aria-label="Bootstrap">
                    <use xlink:href="#bootstrap"></use>
                </svg>
            </a>
            <ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0">
                <li><a href="/" class="nav-link px-2  text-white">首页</a></li>
                <li auth:hasPerms="online"><a th:href="'/online?appId='+${cToken.details.appId}"
                                              class="nav-link px-2  text-white">在线用户</a></li>
                <li auth:hasPerms="cat"><a href="/pet/cat" class="nav-link px-2  text-white">路由权限</a></li>
                <li auth:hasPerms="anno"><a href="/anno" class="nav-link px-2  text-white">注解权限</a></li>
                <li auth:hasPerms="tag"><a href="/tag" class="nav-link px-2  text-white">thymeleaf权限Tag</a></li>
            </ul>
            <div auth:authenticated class="text-end">
                <a class="btn btn-danger me-2" href="/logout">注销</a>
                <span class="ms-2" th:if="${cToken}!=null">
                     <span th:text="${cToken.details.attributes.get('username')}"></span>
                </span>
            </div>
        </div>
    </div>
</header>
<section style="margin-top: 100px" layout:fragment="content"></section>
<footer>
    <div class="container-fluid">
        <footer class="py-3 my-4">
            <ul class="nav justify-content-center border-bottom pb-3 mb-3">
                <li class="nav-item"><a href="#" class="nav-link px-2 text-muted">Home</a></li>
                <li class="nav-item"><a href="#" class="nav-link px-2 text-muted">Features</a></li>
                <li class="nav-item"><a href="#" class="nav-link px-2 text-muted">Pricing</a></li>
                <li class="nav-item"><a href="#" class="nav-link px-2 text-muted">FAQs</a></li>
                <li class="nav-item"><a href="#" class="nav-link px-2 text-muted">About</a></li>
            </ul>
            <p class="text-center text-muted">© 2021 Luter, Inc</p>
        </footer>
    </div>
</footer>
<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.14/vue.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.0.2/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>
<script layout:fragment="script"></script>
</body>
</html>
